@echo off

SET CFLG=-D___SYS_I486 -D___OS_WIN

IF "%1" EQU "-prof" (
  SET COPT=-g -pg
  shift
) else (
  SET COPT=-s
)
IF "%1" EQU "" (
  echo "Args: [-prof] <name>"
  exit
)
SET NAM=%1
shift

echo CFLG=%CFLG%
gcc %COPT% -O2 -Wall -o %NAM%.exe %CFLG% %NAM%.c
rem jpeg.exe %1 %2 %3 %4 %5 %6 %7 %8
rem gprof jpeg.exe gmon.out >zz1
